<?php

namespace app\admin\validate;


class Answer extends BaseValidate
{
    protected $rule = [
        "answer_name"       => "require|max:10",
        "consul"            =>"require",
        "desc"              =>"require",
        "speciality"        =>"require",
        "qq"                =>"require|number|length:4,13",
        //'email' => 'email',   chsDash::汉字、字母、数字和下划线_及破折号-    chs 只能是汉字
        //'phone'=>['regex'=>'/^((\+?86)|(\(\+86\)))?\d{3,4}-\d{7,8}(-\d{3,4})?$|^((\+?86)|(\(\+86\)))?1\d{10}$/'],
       // 'address' => 'max:60',
    ];

    protected $message = [
        'answer_name.require'       => '用户名必须存在',
        'answer_name.max'           => '用户名能超过10个字符',
//        'consul.chs'                => '咨询只能是汉字',
        'consul.require'            => '咨询不能为空',
//        'desc.chs'                  =>'描述只能是汉字',
        'desc.require'              =>'描述不能为空',
//        'speciality.chs'            => '特长只能是汉字',
        'speciality.require'        => '特长不能为空',
        'QQ.require'                =>'qq不能为空',
        'QQ.number'                 =>'qq必须是数字格式',
        'QQ.length                 '=>'qq长度在4---13位之间',
      //  'email' => '邮箱格式错误',
       // 'phone' => '用户联系方式错误',
       // 'address' => '用户地址不能超过60个字符',
    ];
}